//package com.plian.system.controller.mt;
//
//
//import com.plian.Tools.pagedata.PageData;
//import com.plian.system.annotation.Behavioral;
//import com.plian.system.dto.mt.TemporaryTaskDistributionDTO;
//import com.plian.system.entity.mt.TemporaryTaskDistribution;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.mt.ITemporaryTaskDistributionService;
//import com.plian.system.vo.mt.FeedbackVO;
//import com.plian.system.vo.mt.TemporaryTaskDistributionVO;
//import com.plian.system.vo.mt.TemporaryTaskUrgeVO;
//import com.plian.system.vo.report.ReportReturnVO;
//import io.swagger.annotations.ApiOperation;
//import lombok.RequiredArgsConstructor;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.*;
//import org.springframework.web.multipart.MultipartFile;
//
//import javax.servlet.http.HttpServletResponse;
//import java.util.List;
//
///**
// * <p>
// * 临时任务下发 前端控制器
// * </p>
// *
// * @author hu song
// * @since 2023-02-07
// */
//@RestController
//@RequestMapping("/api/temporary-task-distribution")
//@RequiredArgsConstructor
//public class TemporaryTaskDistributionController {
//
//    private final ITemporaryTaskDistributionService temporaryTaskDistributionService;
//
//    @ApiOperation("分页查询")
//    @PostMapping("/list")
//    public ListResult<TemporaryTaskDistributionVO> list(@RequestBody Query query) {
//        return temporaryTaskDistributionService.findAll(query);
//    }
//
//    @ApiOperation("详情")
//    @PostMapping("/detail")
//    @Behavioral
//    public R<TemporaryTaskDistributionVO> detail(@RequestBody TemporaryTaskDistribution temporaryTaskDistribution) {
//        return R.data(temporaryTaskDistributionService.detail(temporaryTaskDistribution));
//    }
//
//    @ApiOperation(value = "新增或修改")
//    @PostMapping("/submit")
//    public R submit(@Validated @RequestBody TemporaryTaskDistribution temporaryTaskDistribution) {
//        return temporaryTaskDistributionService.saveOrUpdate(temporaryTaskDistribution) ? R.data(temporaryTaskDistribution) : R.fail();
//    }
//
//    @ApiOperation(value = "批量删除")
//    @PostMapping("/remove")
//    public R remove(@RequestBody PageData pd) {
//        List<String> ids = (List<String>) pd.get("ids");
//        return temporaryTaskDistributionService.delete(ids) ? R.success() : R.fail();
//    }
//
//    @ApiOperation(value = "数据收集类型反馈")
//    @PostMapping("/dataCollectionFeedback")
//    public R dataCollectionFeedback(@Validated @RequestBody FeedbackVO vo) {
//        return R.data(temporaryTaskDistributionService.dataCollectionFeedback(vo));
//
//    }
//
//    @ApiOperation(value = "文件收集类型反馈")
//    @PostMapping("/fileCollectionFeedback")
//    public R feedback(@Validated @RequestBody FeedbackVO vo) throws Exception {
//        return temporaryTaskDistributionService.fileCollectionFeedback(vo) ? R.success() : R.fail();
//
//    }
//
//    @ApiOperation(value = "意见反馈")
//    @PostMapping("/opinionFeedback")
//    public R opinionFeedback(@RequestBody FeedbackVO vo) {
//        return temporaryTaskDistributionService.opinionFeedback(vo) ? R.success() : R.fail();
//    }
//
//    @ApiOperation(value = "意见反馈导出")
//    @PostMapping("/export")
//    public void export(@RequestBody FeedbackVO vo, HttpServletResponse response) {
//        temporaryTaskDistributionService.export(vo.getTaskId(), vo.getUserVos(), response);
//    }
//
//    @ApiOperation(value = "下发")
//    @PostMapping("/issued")
//    public R issued(@RequestBody TemporaryTaskDistributionDTO dto) throws Exception {
//        return temporaryTaskDistributionService.issued(dto.getId()) ? R.success() : R.fail();
//    }
//
//    @ApiOperation(value = "催办")
//    @PostMapping("/urge")
//    public R urge(@Validated @RequestBody TemporaryTaskUrgeVO vo) throws Exception {
//        temporaryTaskDistributionService.urge(vo);
//        return R.success();
//    }
//
//    @ApiOperation(value = "数据反馈导入模版")
//    @PostMapping("/importTemplate")
//    public R importTemplate(@RequestParam("file") MultipartFile file) {
//        return R.data(temporaryTaskDistributionService.importTemplate(file));
//
//    }
//
//    @ApiOperation(value = "数据反馈导出模版")
//    @PostMapping("/exportTemplate")
//    public void exportTemplate(@RequestBody ReportReturnVO reportReturnVO, HttpServletResponse response) {
//        temporaryTaskDistributionService.exportTemplate(reportReturnVO, response);
//    }
//
//    @ApiOperation(value = "上报")
//    @PostMapping("/report")
//    public R report(@RequestParam Long temporaryUserId, @RequestParam(defaultValue = "false") Boolean isReport) {
//        temporaryTaskDistributionService.report(temporaryUserId, isReport);
//        return R.success();
//    }
//}
//
